package io.renren.modules.student.service.impl;

import io.renren.common.utils.PageUtils;
import io.renren.modules.student.dao.TeachPlanDao;
import io.renren.modules.student.entity.TeachPlanEntity;
import io.renren.modules.student.service.TeachPlanService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class TeachPlanServiceImpl implements TeachPlanService{
    @Autowired
    TeachPlanDao teachPlanDao;

    @Override
    public PageUtils getListBySchoolId(Integer id) {
        PageUtils page=new PageUtils();
        page.setList(teachPlanDao.getCourseList(id));
        page.setTotalCount(teachPlanDao.getTotalBySchoolId(id));
        return page;
    }

    @Override
    public void delete(Integer id) {
        teachPlanDao.delete(id);
    }

    @Override
    public void save(TeachPlanEntity teachPlanEntity) {
        teachPlanDao.save(teachPlanEntity);
    }
}
